package org.sky.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 12-10-16
 * Time: 下午8:43
 * To change this template use File | Settings | File Templates.
 */

@Entity
public class Authorities implements Serializable {

    /**
     * 权限组编号
     */
    private Person person;
    /**
     * 权限组名称
     */
    private String Authority;

    @Column(nullable=false,length = 50,columnDefinition="varchar(20) default 'ROLE_USER'")
    public String getAuthority() {
        return Authority;
    }

    public void setAuthority(String authority) {
        this.Authority = authority;
    }

    @Id
    @OneToOne
    @JoinColumn(nullable = false)
    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }
}
